package com.xxgc.eow.service.impl;

import com.xxgc.eow.entity.Useropenid;
import com.xxgc.eow.mapper.UseropenidMapper;
import com.xxgc.eow.service.IUseropenidService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * <p>
 * 用户微信id表 服务实现类
 * </p>
 *
 * @author Mr.Abel
 * @since 2023-06-03
 */
@Service
public class UseropenidServiceImpl extends ServiceImpl<UseropenidMapper, Useropenid> implements IUseropenidService {

    @Resource
    private UseropenidMapper useropenidMapper;

    @Override
    public Integer getUserIdByOpenId(String openId) {
        return useropenidMapper.selectUserIdByOpenId(openId);
    }

    @Override
    public Integer saveUserOpenId(Useropenid useropenid) {
        return useropenidMapper.insertUserOpenId(useropenid);
    }

}
